<?php
/**
 * Users controller class
 *
 */
class ObjectsController extends Admin_Controller
{
    private $_table;    

	public function init()
    {
        parent::init();
    	$this->_table = &$this->table_objects;        
    }

    /**
     * index action method
     *
     */

    public function indexAction()
    {
    	$this->_redirect('/');
    }
    
    public function listAction()
    {
    	$group = $this->_getParam('group');
    	$group_id = $this->_getParam('id');
    	$page = $this->_getParam('page', 1);
    	
    	$params[$group] = $group_id;    	
    	$data = $this->_table->GetDataList($page, null, 40, $params); 	    	
    	
        $this->startContent();
	        $this->view->xmlWriter->startElement("Main");
	        $this->view->assign('data', $data);	        
		    $this->view->xmlWriter->endElement();
	    $this->view->xmlWriter->endElement();    	
    }    
    
}
